<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />  
    <title>定向优惠券</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta name="author" content="飞啊飘啊">
	<meta name="hashcode" content="-1335312275">
	
	<script>window.duteTag="lz";</script>
	<script type="text/javascript" src="/manage/js/dute-1.0.js"></script>
	<script type="text/javascript" src="/manage/js/jquery-1.7.1.min.js"></script>

	<script type="text/javascript" src="/manage/js/lazy3q.ui.js"></script>
	<script>
		document.write('<link rel="stylesheet" type="text/css" href="/manage//css/'+($.cookie('theme')||'elegant')+'/lazy3q.ui.css" /> ');
	</script>
	
	<!-- 用户自定义js(懒加载) -->
	<script type="text/javascript" src="/manage/js/define.js"></script>
	<!-- 用户自定义css样式 -->
	<link rel="stylesheet" type="text/css" href="/manage/css/define.css"/>
	
	
	
	<script type="text/javascript">
		window.basePath="/";
		window.hashcode = "-1335312275";
	</script>
		
	<!-- 感谢kindeditor出品的在线HTML编辑控件 -->
	<script type="text/javascript" charset="utf-8" src="/manage/js/kindeditor/kindeditor.js"></script>
		
	<!-- 感谢My97DatePicker出品的时间控件 -->
	<script language="javascript" type="text/javascript" src="/manage/js/My97DatePicker/WdatePicker.js"></script>
	
	<!------------------------VIEW_HTML_HEAD------------------------>
	<!------------------------VIEW_HTML_HEAD------------------------>	
	
</head>
<script>
Page({
  data:{
    
  },
  onLoad: function(options) {
  	var THIS = this;
  	THIS.setData(options);
  	$.getAjax("directcoupon.get.do",options,function(protocol){
  		if(protocol.message){
  			$.toast(protocol.message);
  		}
  		THIS.setData(protocol.data);
  		/******************VIEW_HTML_SET_DATA******************/
  		/******************VIEW_HTML_SET_DATA******************/
  	});
  }
});
</script>
<script>
window["lzFlashUrl"]=top.lzFlashUrl||"/admin/flash/";
window["uploadUrl"]=top.uploadUrl||"/admin/upload.do";

$(function(){
		 
	$("#directcouponForm").form({
		"":function(){}
		,"directCoupon.id":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
			}
		}
		,"directCoupon.title":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
				if(jQuery.trim(el.value)=="")
					return "优惠券名称不能为空";
			}
			if(el.value.length>32 && el.value.indexOf("[*]")==-1)
				return "优惠券名称最大长度为32个字符";
		}
		,"directCoupon.count":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
				if(jQuery.trim(el.value)=="")
					return "生成数量不能为空";
			}
				if(el.value.length>10)
					return "数字太大了";
					 var pattern = /^-?(0|[1-9][0-9]*)?$/;
					 if(!pattern.test(el.value))
						return "请输入正确格式的数字";			
		}
		,"directCoupon.discount":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
			}
				var pattern = /^-?(([1-9]\d{0,9})|0)?(\.)?(\d+)?/;
				if(el.value!="" && !pattern.test(el.value))
					return "折扣输入格式错误";
		}
		,"directCoupon.deadline":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
				if(jQuery.trim(el.value)=="")
					return "截止时间不能为空";
			}
		}
		,"directCoupon.directObject":function(el){
		}
		,"directCoupon.accumulatedFull":function(el){
				var pattern = /^-?(([1-9]\d{0,9})|0)?(\.)?(\d+)?/;
				if(el.value!="" && !pattern.test(el.value))
					return "消费累计满领输入格式错误";
		}
		,"directCoupon.fullDay":function(el){
				if(el.value.length>10)
					return "数字太大了";
					 var pattern = /^-?(0|[1-9][0-9]*)?$/;
					 if(!pattern.test(el.value))
						return "请输入正确格式的数字";			
		}
		,"directCoupon.desigUser":function(el){
		}
		,"directCoupon.received":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
				if(jQuery.trim(el.value)=="")
					return "已领取数量不能为空";
			}
				if(el.value.length>10)
					return "数字太大了";
					 var pattern = /^-?(0|[1-9][0-9]*)?$/;
					 if(!pattern.test(el.value))
						return "请输入正确格式的数字";			
		}
		,"directCoupon.used":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
				if(jQuery.trim(el.value)=="")
					return "已使用数量不能为空";
			}
				if(el.value.length>10)
					return "数字太大了";
					 var pattern = /^-?(0|[1-9][0-9]*)?$/;
					 if(!pattern.test(el.value))
						return "请输入正确格式的数字";			
		}
		,"directCoupon.updateTime":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
				if(jQuery.trim(el.value)=="")
					return "修改时间不能为空";
			}
		}
		,"directCoupon.addTime":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
				if(jQuery.trim(el.value)=="")
					return "添加时间不能为空";
			}
		}
		,"directCoupon.status":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
				if(jQuery.trim(el.value)=="")
					return "请选择状态";
			}
		}
		,"directCoupon.merchant":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
			}
		}
		,"directCoupon.introduction":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
				if(jQuery.trim(el.value)=="")
					return "规则介绍不能为空";
			}
			if(el.value.length>225 && el.value.indexOf("[*]")==-1)
				return "规则介绍最大长度为225个字符";
		}
		,"directCoupon.commodity":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
			}
		}
	},function(){
		/******************************LAZY3Q_FORM_VALIDATE******************************/
		/******************************LAZY3Q_FORM_VALIDATE******************************/
	});		
});
</script>

<body style="display:none;">



<!------------------------VIEW_HTML_TOP------------------------>
<!------------------------VIEW_HTML_TOP------------------------>



<form lz:if="{{edittype=='insert'||edittype=='update'||edittype=='detail'||edittype=='any'}}" class="form editform edittype_{{edittype}}" ref="DirectCoupon" id="directcouponForm" name="directcouponForm" target="jsoniframe" action="directcoupon.{{edittype=='any'?'update':edittype}}.do" method="post">
	<div class="head"></div>
	<div class="body">
		<div class="content">
			<div lz:if="{{edittype!='detail'}}" class="prompt">
				温馨提示：请仔细填写定向优惠券相关信息，<span class="extrude">"*" 为必填选项。</span>
			</div>
			<br/>
			<lz:block lz:if="{{message}}">
			<br/>
			<center>
				<font color="red"><h4>{{message}}</h4></font>
			</center>
			<br/>
			</lz:block>
			<input type="hidden" value="{{complete}}" name="complete" id="complete" />
			<input type="hidden" value="{{ids}}" name="ids" id="ids" />
			<textarea name="PARAMS" id="PARAMS" style="display:none">{{PARAMS}}</textarea>
	{{lz.set("id_editable",(edittype=='insert'&&true)||(edittype=='update'&&true)||(edittype=='any'&&(lz.idin(fields,"id"))))}}
	{{lz.set("id_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$id}}
	<dl lz:if="{{id_editable||id_readonly}}" class="id hidden " major  ref="id">
		<dt>编　　号:</dt>
		<dd lz:if="{{id_editable}}" input="hidden">
			<lz:block lz:if="{{directCoupon$id}}">
				{{directCoupon$id}}
			</lz:block>
			<lz:block lz:if="{{!directCoupon$id}}">
			<input type="hidden" value="{{lz.htm(directCoupon.id)}}" name="directCoupon.id" id="id" />
	 	 </lz:block>
	 	 
	 	 <em></em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{id_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="id">{{directCoupon.id}}</textarea>
		 		<span>
		 	
			 {{lz.html(directCoupon.id$||directCoupon.id)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$id}}
	{{lz.set("title_editable",(edittype=='insert'&&true)||(edittype=='update'&&true)||(edittype=='any'&&(lz.idin(fields,"title"))))}}
	{{lz.set("title_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$title}}
	<dl lz:if="{{title_editable||title_readonly}}" class="title  " major  ref="title">
		<dt>优惠券名称:</dt>
		<dd lz:if="{{title_editable}}" input="text">
			<lz:block lz:if="{{directCoupon$title}}">
				{{directCoupon$title}}
			</lz:block>
			<lz:block lz:if="{{!directCoupon$title}}">
		 	<input type="text" class="input narrow"  maxlength="32" name="directCoupon.title" id="title"  value="{{lz.htm(directCoupon.title)}}"/>
	 	 </lz:block>
	 	 <b>*</b>
	 	 <em>请输入定向优惠券的优惠券名称</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{title_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="title">{{directCoupon.title}}</textarea>
		 		<span>
		 	
			 {{lz.html(directCoupon.title$||directCoupon.title)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$title}}
	{{lz.set("count_editable",(edittype=='insert'&&true)||(edittype=='update'&&true)||(edittype=='any'&&(lz.idin(fields,"count"))))}}
	{{lz.set("count_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$count}}
	<dl lz:if="{{count_editable||count_readonly}}" class="count  " major  ref="count">
		<dt>生成数量:</dt>
		<dd lz:if="{{count_editable}}" input="number">
			<lz:block lz:if="{{directCoupon$count}}">
				{{directCoupon$count}}
			</lz:block>
			<lz:block lz:if="{{!directCoupon$count}}">
			<input onkeyup="var reg=/^-?(([1-9]\d{0,9})|0)?/;this.value=this.value.match(reg)?this.value.match(reg)[0]:''" type="text" class="input narrow"  maxlength="8" name="directCoupon.count" id="count"  value="{{lz.htm(directCoupon.count)}}"/>
	 	 </lz:block>
	 	 <b>*</b>
	 	 <em>请输入定向优惠券的生成数量</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{count_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="count">{{directCoupon.count}}</textarea>
		 		<span>
		 	
			 {{lz.html(directCoupon.count$||directCoupon.count)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$count}}
	{{lz.set("discount_editable",(edittype=='insert'&&true)||(edittype=='update'&&true)||(edittype=='any'&&(lz.idin(fields,"discount"))))}}
	{{lz.set("discount_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$discount}}
	<dl lz:if="{{discount_editable||discount_readonly}}" class="discount  " major  ref="discount">
		<dt>折　　扣:</dt>
		<dd lz:if="{{discount_editable}}" input="menoy">
			<lz:block lz:if="{{directCoupon$discount}}">
				{{directCoupon$discount}}
			</lz:block>
			<lz:block lz:if="{{!directCoupon$discount}}">
		 	<input onchange="onkeyup()" onkeyup="var reg=/^-?(([1-9]\d{0,9})|0)?(\.)?(\d+)?/;this.value=this.value.match(reg)?this.value.match(reg)[0]:''" type="text" class="input narrow"  maxlength="8" name="directCoupon.discount" id="discount"  value="{{lz.htm(directCoupon.discount)}}"/>
	 	 </lz:block>
	 	 <b>*</b>
	 	 <em>请输入定向优惠券的折扣</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{discount_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="discount">{{directCoupon.discount}}</textarea>
		 		<span>
		 	
			 {{lz.html(directCoupon.discount$||directCoupon.discount)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$discount}}
	{{lz.set("deadline_editable",(edittype=='insert'&&true)||(edittype=='update'&&true)||(edittype=='any'&&(lz.idin(fields,"deadline"))))}}
	{{lz.set("deadline_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$deadline}}
	<dl lz:if="{{deadline_editable||deadline_readonly}}" class="deadline  " major  ref="deadline">
		<dt>截止时间:</dt>
		<dd lz:if="{{deadline_editable}}" input="datetime">
			<lz:block lz:if="{{directCoupon$deadline}}">
				{{directCoupon$deadline}}
			</lz:block>
			<lz:block lz:if="{{!directCoupon$deadline}}">
		 	<input onchange="void(0);" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" type="text" class="datetime input narrow" maxlength="19" name="directCoupon.deadline" id="deadline"  value="{{directCoupon.deadline$}}"/>
	 	 </lz:block>
	 	 <b>*</b>
	 	 <em>请选择定向优惠券的截止时间</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{deadline_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="deadline">{{directCoupon.deadline}}</textarea>
		 		<span>
		 	
			 {{lz.html(directCoupon.deadline$||directCoupon.deadline)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$deadline}}
	{{lz.set("directObject_editable",(edittype=='insert'&&true)||(edittype=='update'&&true)||(edittype=='any'&&(lz.idin(fields,"directObject"))))}}
	{{lz.set("directObject_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$directObject}}
	<dl lz:if="{{directObject_editable||directObject_readonly}}" class="ribs directObject  " major  ref="directObject">
		<dt>定向投放对象:</dt>
		<dd lz:if="{{directObject_editable}}" input="select">
			<lz:block lz:if="{{directCoupon$directObject}}">
				{{directCoupon$directObject}}
			</lz:block>
			<lz:block lz:if="{{!directCoupon$directObject}}">
		 	<select class="narrow" id="directObject" name="directCoupon.directObject">
		 		<option value="">请选择</option>
				<option value="1" selected='{{directCoupon.directObject=="1"?"selected":""}}'>全部用户</option>
				<option value="2" selected='{{directCoupon.directObject=="2"?"selected":""}}'>消费金额满</option>
				<option value="3" selected='{{directCoupon.directObject=="3"?"selected":""}}'>注册时间满</option>
				<option value="4" selected='{{directCoupon.directObject=="4"?"selected":""}}'>指定用户</option>
		 	</select>
	 	 </lz:block>
	 	 
	 	 <em>请选择定向优惠券的定向投放对象</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{directObject_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="directObject">{{directCoupon.directObject}}</textarea>
		 		<span>
		 	
			 {{lz.html(directCoupon.directObject$||directCoupon.directObject)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$directObject}}
	{{lz.set("accumulatedFull_editable",(edittype=='insert'&&true)||(edittype=='update'&&true)||(edittype=='any'&&(lz.idin(fields,"accumulatedFull"))))}}
	{{lz.set("accumulatedFull_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$accumulatedFull}}
	<dl lz:if="{{accumulatedFull_editable||accumulatedFull_readonly}}" class="ribs accumulatedFull  " major  ref="accumulatedFull">
		<dt>消费累计满领:</dt>
		<dd lz:if="{{accumulatedFull_editable}}" input="menoy">
			<lz:block lz:if="{{directCoupon$accumulatedFull}}">
				{{directCoupon$accumulatedFull}}
			</lz:block>
			<lz:block lz:if="{{!directCoupon$accumulatedFull}}">
		 	<input onchange="onkeyup()" onkeyup="var reg=/^-?(([1-9]\d{0,9})|0)?(\.)?(\d+)?/;this.value=this.value.match(reg)?this.value.match(reg)[0]:''" type="text" class="input narrow"  maxlength="8" name="directCoupon.accumulatedFull" id="accumulatedFull"  value="{{lz.htm(directCoupon.accumulatedFull)}}"/>
	 	 </lz:block>
	 	 
	 	 <em>请输入定向优惠券的消费累计满领</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{accumulatedFull_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="accumulatedFull">{{directCoupon.accumulatedFull}}</textarea>
		 		<span>
		 	
			 {{lz.html(directCoupon.accumulatedFull$||directCoupon.accumulatedFull)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$accumulatedFull}}
	{{lz.set("fullDay_editable",(edittype=='insert'&&true)||(edittype=='update'&&true)||(edittype=='any'&&(lz.idin(fields,"fullDay"))))}}
	{{lz.set("fullDay_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$fullDay}}
	<dl lz:if="{{fullDay_editable||fullDay_readonly}}" class="ribs fullDay  " major  ref="fullDay">
		<dt>注册满天数领:</dt>
		<dd lz:if="{{fullDay_editable}}" input="number">
			<lz:block lz:if="{{directCoupon$fullDay}}">
				{{directCoupon$fullDay}}
			</lz:block>
			<lz:block lz:if="{{!directCoupon$fullDay}}">
			<input onkeyup="var reg=/^-?(([1-9]\d{0,9})|0)?/;this.value=this.value.match(reg)?this.value.match(reg)[0]:''" type="text" class="input narrow"  maxlength="8" name="directCoupon.fullDay" id="fullDay"  value="{{lz.htm(directCoupon.fullDay)}}"/>
	 	 </lz:block>
	 	 
	 	 <em>请输入定向优惠券的注册满天数领</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{fullDay_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="fullDay">{{directCoupon.fullDay}}</textarea>
		 		<span>
		 	
			 {{lz.html(directCoupon.fullDay$||directCoupon.fullDay)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$fullDay}}
	{{lz.set("desigUser_editable",(edittype=='insert'&&true)||(edittype=='update'&&true)||(edittype=='any'&&(lz.idin(fields,"desigUser"))))}}
	{{lz.set("desigUser_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$desigUser}}
	<dl lz:if="{{desigUser_editable||desigUser_readonly}}" class="ribs desigUser  " major  ref="desigUser">
		<dt>指定用户:</dt>
		<dd lz:if="{{desigUser_editable}}" input="query">
			<lz:block lz:if="{{directCoupon$desigUser}}">
				{{directCoupon$desigUser}}
			</lz:block>
			<lz:block lz:if="{{!directCoupon$desigUser}}">
		 			<input title="请输入会员信息昵称进行查询" class="combox narrow" action="/manage/query.Member.do?value={param}" type="text" id="desigUser" name="directCoupon.desigUser" text="{{lz.html(directCoupon.desigUser$||directCoupon.desigUser)}}" value="{{lz.htm(directCoupon.desigUser)}}" />
	 	 </lz:block>
	 	 
	 	 <em></em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{desigUser_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="desigUser">{{directCoupon.desigUser}}</textarea>
		 		<span>
		 	
			 {{lz.html(directCoupon.desigUser$||directCoupon.desigUser)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$desigUser}}
	{{lz.set("received_editable",(edittype=='insert'&&true)||(edittype=='update'&&true)||(edittype=='any'&&(lz.idin(fields,"received"))))}}
	{{lz.set("received_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$received}}
	<dl lz:if="{{received_editable||received_readonly}}" class="received  " major  ref="received">
		<dt>已领取数量:</dt>
		<dd lz:if="{{received_editable}}" input="number">
			<lz:block lz:if="{{directCoupon$received}}">
				{{directCoupon$received}}
			</lz:block>
			<lz:block lz:if="{{!directCoupon$received}}">
			<input onkeyup="var reg=/^-?(([1-9]\d{0,9})|0)?/;this.value=this.value.match(reg)?this.value.match(reg)[0]:''" type="text" class="input narrow"  maxlength="8" name="directCoupon.received" id="received"  value="{{lz.htm(directCoupon.received)}}"/>
	 	 </lz:block>
	 	 <b>*</b>
	 	 <em>请输入定向优惠券的已领取数量</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{received_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="received">{{directCoupon.received}}</textarea>
		 		<span>
		 	
			 {{lz.html(directCoupon.received$||directCoupon.received)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$received}}
	{{lz.set("used_editable",(edittype=='insert'&&true)||(edittype=='update'&&true)||(edittype=='any'&&(lz.idin(fields,"used"))))}}
	{{lz.set("used_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$used}}
	<dl lz:if="{{used_editable||used_readonly}}" class="used  " major  ref="used">
		<dt>已使用数量:</dt>
		<dd lz:if="{{used_editable}}" input="number">
			<lz:block lz:if="{{directCoupon$used}}">
				{{directCoupon$used}}
			</lz:block>
			<lz:block lz:if="{{!directCoupon$used}}">
			<input onkeyup="var reg=/^-?(([1-9]\d{0,9})|0)?/;this.value=this.value.match(reg)?this.value.match(reg)[0]:''" type="text" class="input narrow"  maxlength="8" name="directCoupon.used" id="used"  value="{{lz.htm(directCoupon.used)}}"/>
	 	 </lz:block>
	 	 <b>*</b>
	 	 <em>请输入定向优惠券的已使用数量</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{used_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="used">{{directCoupon.used}}</textarea>
		 		<span>
		 	
			 {{lz.html(directCoupon.used$||directCoupon.used)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$used}}
	{{lz.set("updateTime_editable",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='any'&&(lz.idin(fields,"updateTime"))))}}
	{{lz.set("updateTime_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$updateTime}}
	<dl lz:if="{{updateTime_editable||updateTime_readonly}}" class="updateTime  " major  ref="updateTime">
		<dt>修改时间:</dt>
		<dd lz:if="{{updateTime_editable}}" input="datetime">
			<lz:block lz:if="{{directCoupon$updateTime}}">
				{{directCoupon$updateTime}}
			</lz:block>
			<lz:block lz:if="{{!directCoupon$updateTime}}">
		 	<input onchange="void(0);" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" type="text" class="datetime input narrow" maxlength="19" name="directCoupon.updateTime" id="updateTime"  value="{{directCoupon.updateTime$}}"/>
	 	 </lz:block>
	 	 <b>*</b>
	 	 <em>请选择定向优惠券的修改时间</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{updateTime_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="updateTime">{{directCoupon.updateTime}}</textarea>
		 		<span>
		 	
			 {{lz.html(directCoupon.updateTime$||directCoupon.updateTime)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$updateTime}}
	{{lz.set("addTime_editable",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='any'&&(lz.idin(fields,"addTime"))))}}
	{{lz.set("addTime_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$addTime}}
	<dl lz:if="{{addTime_editable||addTime_readonly}}" class="addTime  " major  ref="addTime">
		<dt>添加时间:</dt>
		<dd lz:if="{{addTime_editable}}" input="datetime">
			<lz:block lz:if="{{directCoupon$addTime}}">
				{{directCoupon$addTime}}
			</lz:block>
			<lz:block lz:if="{{!directCoupon$addTime}}">
		 	<input onchange="void(0);" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" type="text" class="datetime input narrow" maxlength="19" name="directCoupon.addTime" id="addTime"  value="{{directCoupon.addTime$}}"/>
	 	 </lz:block>
	 	 <b>*</b>
	 	 <em>请选择定向优惠券的添加时间</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{addTime_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="addTime">{{directCoupon.addTime}}</textarea>
		 		<span>
		 	
			 {{lz.html(directCoupon.addTime$||directCoupon.addTime)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$addTime}}
	{{lz.set("status_editable",(edittype=='insert'&&false)||(edittype=='update'&&true)||(edittype=='any'&&(lz.idin(fields,"status"))))}}
	{{lz.set("status_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$status}}
	<dl lz:if="{{status_editable||status_readonly}}" class="status  " major  ref="status">
		<dt>状　　态:</dt>
		<dd lz:if="{{status_editable}}" input="select">
			<lz:block lz:if="{{directCoupon$status}}">
				{{directCoupon$status}}
			</lz:block>
			<lz:block lz:if="{{!directCoupon$status}}">
		 	<select class="narrow" id="status" name="directCoupon.status">
		 		<option value="">请选择</option>
				<option value="1" selected='{{directCoupon.status=="1"?"selected":""}}'>正常</option>
				<option value="0" selected='{{directCoupon.status=="0"?"selected":""}}'>无效</option>
		 	</select>
	 	 </lz:block>
	 	 <b>*</b>
	 	 <em>请选择定向优惠券的状态</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{status_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="status">{{directCoupon.status}}</textarea>
		 		<span>
		 	
			 {{lz.html(directCoupon.status$||directCoupon.status)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$status}}
	{{lz.set("introduction_editable",(edittype=='insert'&&true)||(edittype=='update'&&true)||(edittype=='any'&&(lz.idin(fields,"introduction"))))}}
	{{lz.set("introduction_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$introduction}}
	<dl lz:if="{{introduction_editable||introduction_readonly}}" class="introduction   wider" major  ref="introduction">
		<dt>规则介绍:</dt>
		<dd lz:if="{{introduction_editable}}" input="textarea">
			<lz:block lz:if="{{directCoupon$introduction}}">
				{{directCoupon$introduction}}
			</lz:block>
			<lz:block lz:if="{{!directCoupon$introduction}}">
		 	<textarea class="input wide"  id="introduction" name="directCoupon.introduction" rows="5">{{directCoupon.introduction}}</textarea>
	 	 </lz:block>
	 	 <b>*</b>
	 	 <em>请输入定向优惠券的规则介绍</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{introduction_readonly}}">
		 	<div class="state-input wide">
		 		<span>
		 	
			 {{lz.html(directCoupon.introduction$||directCoupon.introduction)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$introduction}}
	{{lz.set("commodity_editable",(edittype=='insert'&&true)||(edittype=='update'&&true)||(edittype=='any'&&(lz.idin(fields,"commodity"))))}}
	{{lz.set("commodity_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$commodity}}
	<dl lz:if="{{commodity_editable||commodity_readonly}}" class="commodity  " major  ref="commodity">
		<dt>适用商品:</dt>
		<dd lz:if="{{commodity_editable}}" input="query">
			<lz:block lz:if="{{directCoupon$commodity}}">
				{{directCoupon$commodity}}
			</lz:block>
			<lz:block lz:if="{{!directCoupon$commodity}}">
		 			<input title="请输入商品信息商品名称进行查询" class="combox narrow" action="/manage/query.Commodity.do?value={param}" type="text" id="commodity" name="directCoupon.commodity" text="{{lz.html(directCoupon.commodity$||directCoupon.commodity)}}" value="{{lz.htm(directCoupon.commodity)}}" />
	 	 </lz:block>
	 	 <b>*</b>
	 	 <em></em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{commodity_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="commodity">{{directCoupon.commodity}}</textarea>
		 		<span>
		 	
			 {{lz.html(directCoupon.commodity$||directCoupon.commodity)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$commodity}}
			
			
			<div class="line">
				<center lz:if="{{edittype=='insert'}}">
					<a onclick="$('.ribs').show();window.fireResize();$('.ribs-handle').toggle();" href="javascript:void(0);" class="state-content ribs-handle" style="display:inline;padding: 0px 15px;">点击展开更多编辑项</a>
					<a onclick="$('.ribs').hide();window.fireResize();$('.ribs-handle').toggle();" href="javascript:void(0);" class="state-content ribs-handle" style="display:none;padding: 0px 15px;">点击收起更多编辑项</a>
				</center>
			</div>
			<center class="buttons">
				<input type="hidden" value="{{directCoupon.id}}" name="directCoupon.id" id="id" />
			
			<lz:block lz:if="{{edittype=='insert'||edittype=='update'||edittype=='any'}}">
				<button class="button" type="submit">
					&nbsp;<img align="absmiddle" width="20" src="/admin/images/icons/Badge-tick.png"/>
					保存&nbsp;&nbsp;</button>
				<button title="不保存数据,关闭窗口,不刷新原列表" class="button" onclick="$.closeModalDialog();" type="button">
					&nbsp;<img align="absmiddle" width="20" src="/admin/images/icons/Badge-multiply.png"/>
					关闭&nbsp;&nbsp;</button>
			</lz:block>
			
			<lz:block lz:if="{{edittype=='detail'}}">
				<button lz:if="{{canEdit}}" type="button" class="button" onclick='window.location.href="/admin/coupons/directcoupon.edit.html?edittype=update&id={{directCoupon.id}}"'>
					&nbsp;<img align="absmiddle" width="20" src="/admin/images/icons/Badge-tick.png"/>
					修改&nbsp;&nbsp;</button>
				<button title="不保存数据,关闭窗口,不刷新原列表" class="button" onclick="$.closeModalDialog();" type="button">
					&nbsp;<img align="absmiddle" width="20" src="/admin/images/icons/Badge-multiply.png"/>
					关闭&nbsp;&nbsp;</button>
			</lz:block>
					
			</center>
			<br/>

		</div>
	</div>
	<div class="foot"></div>		
</form>


 


<!------------------------VIEW_HTML_BOTTOM------------------------>
<!------------------------VIEW_HTML_BOTTOM------------------------>


</body>

<!------------------------VIEW_HTML_FOOTER------------------------>
<!------------------------VIEW_HTML_FOOTER------------------------>
<script>

</script>
</html>